using ExtendedMvc.Elements;

namespace ExtendedMvc {
	public static class FormActionExtensions {

		public static SubmitButton SubmitButton<TModel>(this ModelViewForm<TModel> form, string caption) where TModel : class {
			return new SubmitButton(caption, form.Id);
		}

		public static SubmitImage<TModel> SubmitImage<TModel>(this ModelViewForm<TModel> form, string source) where TModel : class {
			return new SubmitImage<TModel>(form.Helper, source, form.Id);
		}

		public static SubmitLink SubmitLink<TModel>(this ModelViewForm<TModel> form, string caption) where TModel : class {
			return new SubmitLink(caption, form.Id);
		}

		public static ResetButton ResetButton<TModel>(this ModelViewForm<TModel> form, string caption) where TModel : class {
			return new ResetButton(caption, form.Id);
		}

		public static ResetImage<TModel> ResetImage<TModel>(this ModelViewForm<TModel> form, string source) where TModel : class {
			return new ResetImage<TModel>(form.Helper, source, form.Id);
		}

		public static ResetLink ResetLink<TModel>(this ModelViewForm<TModel> form, string caption) where TModel : class {
			return new ResetLink(caption, form.Id);
		}
	}
}
